import { Button } from 'antd'
import { useRef } from 'react'
import "./MusicPlayer.css"
function MusicPlayer() {
    const imgRef = useRef(null)
    const play = () => {
        imgRef.current.style.animationPlayState = 'running'
    }

    const pause = () => {
        imgRef.current.style.animationPlayState = 'paused'
    }
    return <>
        <div className='btn-group'>
            <Button color="cyan" variant="solid">上一曲</Button>
            <Button type='primary' onClick={play}>播放</Button>
            <Button type="primary" danger onClick={pause}>暂停</Button>
            <Button color="cyan" variant="solid">下一曲</Button>
        </div>
        <img ref={imgRef} src="http://10.2.35.4/nezha2/nezha.jpg" alt="" className='changpian' />
    </>
}

export default MusicPlayer